/**
 * 
 */
package com.shine.icis.hbean;

import java.io.Serializable;

/**
 * 上海配股配置
 * @author zhangxr
 *
 */
public class AllotmentConf implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1998411859294309098L;
	
	private Integer confId;
	private String secCode;
	private String allCode;
	private Integer startDate;
	private Integer endDate;
	private Integer operDate;
	private Integer operTime;
	private String note;
	
	
	public Integer getConfId() {
		return confId;
	}
	public void setConfId(Integer confId) {
		this.confId = confId;
	}
	public String getSecCode() {
		return secCode;
	}
	public void setSecCode(String secCode) {
		this.secCode = secCode;
	}
	public String getAllCode() {
		return allCode;
	}
	public void setAllCode(String allCode) {
		this.allCode = allCode;
	}
	public Integer getStartDate() {
		return startDate;
	}
	public void setStartDate(Integer startDate) {
		this.startDate = startDate;
	}
	public Integer getEndDate() {
		return endDate;
	}
	public void setEndDate(Integer endDate) {
		this.endDate = endDate;
	}
	public Integer getOperDate() {
		return operDate;
	}
	public void setOperDate(Integer operDate) {
		this.operDate = operDate;
	}
	public Integer getOperTime() {
		return operTime;
	}
	public void setOperTime(Integer operTime) {
		this.operTime = operTime;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public String getFormatStartDate() {
		StringBuffer sb = new StringBuffer();
		sb.append(startDate);
		if (sb.length() != 8) {
			return "";
		}
		return sb.insert(6, "-").insert(4, "-").toString();
	}
	public String getFormatEndDate() {
		StringBuffer sb = new StringBuffer();
		sb.append(endDate);
		if (sb.length() != 8) {
			return "";
		}
		return sb.insert(6, "-").insert(4, "-").toString();
	}
	public String getFormatOperDate() {
		StringBuffer sb = new StringBuffer();
		sb.append(operDate);
		if (sb.length() != 8) {
			return "";
		}
		return sb.insert(6, "-").insert(4, "-").toString();
	}
	
	public String getFormatOperTime() {
		StringBuffer sb = new StringBuffer();
		sb.append(operTime);
		if (sb.length() == 5) {
			sb.insert(0, "0");
		}
		if (sb.length() != 6) {
			return "";
		}
		return sb.insert(4, ":").insert(2, ":").toString();
	}	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + confId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final AllotmentConf other = (AllotmentConf) obj;
		if (confId != other.confId)
			return false;
		return true;
	}
	
	
}

